export GLOG_logtostderr=1
export GLOG_v=2
scp_path=./wav_100.scp
wav_path=/home/work_nfs14/asr_data/data/aishell_1/origin_wav/data_aishell/wav/test/S0764/BAC009S0764W0130.wav
model_dir=/home/node54_tmpdata/xlgeng/ckpt/format_model/comformer_decoder_aishell
dict_dir=/home/node54_tmpdata/xlgeng/ckpt/format_model/comformer_decoder_aishell/data/dict

jit_model_path=/home/work_nfs15/asr_data/ckpt/asr_online_system/jit_script_chunk_64_left_64.pt
unit_path=/home/work_nfs15/asr_data/ckpt/asr_online_system/lang_char_bpe/tokens.txt
jit_model_path=$model_dir/final.zip
unit_path=$dict_dir/lang_char.txt
text_path=/home/work_nfs15/asr_data/data/aishell_1/raw_scp/test/text
./libtorch/build/bin/decoder_main \
    --chunk_size -1 \
    --wav_scp $scp_path \
    --continuous_decoding true \
    --model_path $jit_model_path \
    --result test.text \
    --unit_path $unit_path 2>&1 | tee log.txt


python tools/compute-wer.py --char=1 --v=1 \
  $text_path test.text
